package P1400;

import java.util.Scanner;

/**
 * @author: zhouyang
 * @descrpition:
 * @time: 2019-09-29 19:20
 */
public class P1422_小玉家的电费 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int total = scanner.nextInt();
        scanner.close();
        if(total == 0) {
            System.out.println(0);
            return;
        }
        double res = 0d;
        boolean flag = false;
        if(total > 150){
            res += 150*0.4463;
        }else{
            res = 0.4463*total;
            flag = true;
        }
        if(!flag){
            if(total > 400){
                res += 250*0.4663;
            }else{
                res += (total-150)*0.4663;
                flag = true;
            }
        }
        if(!flag){
            res += (total-400)*0.5663;
        }
        System.out.printf("%.1f",res);
    }
}
